SIZE_CV_LIQUID
Overview
The SIZE_CV_LIQUID function calculates the flow coefficient (Kv) of a control valve handling liquid flow, following the international standard IEC 60534-2-1 (also published as ISA-75.01.01-2007). This coefficient represents the flow capacity of the valve and is essential for proper valve selection in process control applications.
The calculation uses the fluids Python library, specifically the size_control_valve_l function, which implements the full IEC 60534 sizing methodology for liquids. The library is developed and maintained by Caleb Bell and provides open-source implementations of process engineering calculations.
The Kv coefficient (metric flow coefficient) represents the volumetric flow rate of water in m³/hr that passes through the valve at a pressure drop of 1 bar. This is the European standard metric; the American equivalent is Cv, which uses gallons per minute at 1 psi pressure drop. The relationship between them is approximately K_v = 0.865 \times C_v.
The sizing algorithm accounts for several important phenomena in liquid valve flow:
- Choked flow: When the pressure drop across the valve causes the liquid to reach its vapor pressure, flow becomes limited regardless of further pressure reduction. The liquid pressure recovery factor (FL) characterizes this behavior.
- Viscosity effects: The model applies Reynolds number corrections for laminar or transitional flow regimes.
- Cavitation risk: The calculation considers the fluid’s saturation pressure and critical pressure to evaluate cavitation potential.
The critical pressure ratio factor (FF) used in choked flow calculations is determined by:
F_F = 0.96 - 0.28 \sqrt{\frac{P_{sat}}{P_c}}
where P_{sat} is the saturation pressure at inlet temperature and P_c is the critical pressure of the fluid.
Note that this sizing model does not officially apply to liquid mixtures, slurries, non-Newtonian fluids, or liquid-solid conveyance systems. For more details on the underlying methodology and additional parameters, consult the fluids control valve documentation.
This example function is provided as-is without any representation of accuracy.
Excel Usage
=SIZE_CV_LIQUID(rho, psat, pc, mu, p_in, p_out, q, fl, fd)
rho(float, required): Density of the liquid at the inlet [kg/m^3]psat(float, required): Saturation pressure of the fluid at inlet temperature [Pa]pc(float, required): Critical pressure of the fluid [Pa]mu(float, required): Viscosity of the fluid [Pa*s]p_in(float, required): Inlet pressure of the fluid before valves and reducers [Pa]p_out(float, required): Outlet pressure of the fluid after valves and reducers [Pa]q(float, required): Volumetric flow rate of the fluid [m^3/s]fl(float, optional, default: 0.9): Liquid pressure recovery factor (0 < fl <= 1)fd(float, optional, default: 1): Valve style modifier (0 < fd <= 1)
Returns (float): Metric Kv valve coefficient (float), or error message string.
Examples
Example 1: Basic control valve sizing
Inputs:
| rho | psat | pc | mu | p_in | p_out | q | fl | fd |
|---|---|---|---|---|---|---|---|---|
| 965.4 | 70100 | 221200000 | 0.00031472 | 680000 | 220000 | 0.1 | 0.9 | 0.46 |
Excel formula:
=SIZE_CV_LIQUID(965.4, 70100, 221200000, 0.00031472, 680000, 220000, 0.1, 0.9, 0.46)
Expected output:
165.5831
Example 2: With default FL and FD values
Inputs:
| rho | psat | pc | mu | p_in | p_out | q |
|---|---|---|---|---|---|---|
| 1000 | 2337 | 22064000 | 0.001 | 500000 | 300000 | 0.05 |
Excel formula:
=SIZE_CV_LIQUID(1000, 2337, 22064000, 0.001, 500000, 300000, 0.05)
Expected output:
127.1174
Example 3: Different FL and FD values
Inputs:
| rho | psat | pc | mu | p_in | p_out | q | fl | fd |
|---|---|---|---|---|---|---|---|---|
| 965.4 | 70100 | 221200000 | 0.00031472 | 680000 | 220000 | 0.1 | 0.6 | 0.98 |
Excel formula:
=SIZE_CV_LIQUID(965.4, 70100, 221200000, 0.00031472, 680000, 220000, 0.1, 0.6, 0.98)
Expected output:
238.1282
Example 4: Low flow rate application
Inputs:
| rho | psat | pc | mu | p_in | p_out | q | fl | fd |
|---|---|---|---|---|---|---|---|---|
| 800 | 1000 | 15000000 | 0.0005 | 400000 | 350000 | 0.001 | 0.85 | 0.9 |
Excel formula:
=SIZE_CV_LIQUID(800, 1000, 15000000, 0.0005, 400000, 350000, 0.001, 0.85, 0.9)
Expected output:
4.5625
Python Code
import micropip
await micropip.install(["fluids"])
import math
from fluids.control_valve import size_control_valve_l as fluids_size_control_valve_l
def size_cv_liquid(rho, psat, pc, mu, p_in, p_out, q, fl=0.9, fd=1):
"""
Calculates the flow coefficient (Kv) of a control valve passing a liquid according to IEC 60534.
See: https://fluids.readthedocs.io/fluids.control_valve.html#fluids.control_valve.size_control_valve_l
This example function is provided as-is without any representation of accuracy.
Args:
rho (float): Density of the liquid at the inlet [kg/m^3]
psat (float): Saturation pressure of the fluid at inlet temperature [Pa]
pc (float): Critical pressure of the fluid [Pa]
mu (float): Viscosity of the fluid [Pa*s]
p_in (float): Inlet pressure of the fluid before valves and reducers [Pa]
p_out (float): Outlet pressure of the fluid after valves and reducers [Pa]
q (float): Volumetric flow rate of the fluid [m^3/s]
fl (float, optional): Liquid pressure recovery factor (0 < fl <= 1) Default is 0.9.
fd (float, optional): Valve style modifier (0 < fd <= 1) Default is 1.
Returns:
float: Metric Kv valve coefficient (float), or error message string.
"""
def validate_positive(value, name):
try:
val = float(value)
if val <= 0:
return None, f"Error: {name} must be a positive number."
return val, None
except (ValueError, TypeError):
return None, f"Error: {name} must be a numeric value."
def validate_non_negative(value, name):
try:
val = float(value)
if val < 0:
return None, f"Error: {name} must be a non-negative number."
return val, None
except (ValueError, TypeError):
return None, f"Error: {name} must be a numeric value."
def validate_range(value, name, low, high):
try:
val = float(value)
if val <= low or val > high:
return None, f"Error: {name} must be between {low} (exclusive) and {high} (inclusive)."
return val, None
except (ValueError, TypeError):
return None, f"Error: {name} must be a numeric value."
# Validate input parameters
rho, err = validate_positive(rho, "rho")
if err:
return err
psat, err = validate_non_negative(psat, "psat")
if err:
return err
pc, err = validate_positive(pc, "pc")
if err:
return err
mu, err = validate_positive(mu, "mu")
if err:
return err
p_in, err = validate_non_negative(p_in, "p_in")
if err:
return err
p_out, err = validate_non_negative(p_out, "p_out")
if err:
return err
if p_out > p_in:
return "Error: p_out must be less than or equal to p_in."
q, err = validate_non_negative(q, "q")
if err:
return err
fl, err = validate_range(fl, "fl", 0, 1)
if err:
return err
fd, err = validate_range(fd, "fd", 0, 1)
if err:
return err
# Check for non-finite values
if any(not math.isfinite(val) for val in [rho, psat, pc, mu, p_in, p_out, q, fl, fd]):
return "Error: All parameters must be finite numbers."
# Call the actual function from the fluids library
try:
result = fluids_size_control_valve_l(
rho=rho, Psat=psat, Pc=pc, mu=mu, P1=p_in, P2=p_out, Q=q, FL=fl, Fd=fd
)
if not isinstance(result, (int, float)) or not math.isfinite(result):
return "Error: Result is not a finite number."
return result
except Exception as e:
return f"Error: Failed to compute liquid valve sizing: {str(e)}"